package com.da.javatest.niuke.baodian;

/**
 * @author chenlida
 * @date 2020/10/10 10:56
 * https://www.nowcoder.com/practice/3000672cd9a74c59b46a085a1232af2f?tpId=8&tags=&title=&diffculty=0&judgeStatus=0&rp=1
 */
public class C43MagicIndex {
    public boolean findMagicIndex(int[] A, int n) {
        for (int i = 0; i < n; i++) {
            if (A[i] == i) {
                return true;
            }
        }
        return false;
    }
}
